package com.lej.dataservice.club.bean.pick

import com.lej.core.common.AT_SCHOOL
import com.lej.core.common.TYPE_PIC
import com.lej.core.common.TYPE_VIDEO
import com.lej.core.common.UN_AT_SCHOOL
import com.lej.core.provider.resourceProvider
import com.lej.core.utils.qiniuSlim

/**
 * Created by Administrator on 2020-07-29
 */
class PickResultItemInfo : PickItemInfo() {
    var pick_times: Int = 0//pick胜利次数

    /**毕业状态[AT_SCHOOL],[UN_AT_SCHOOL]*/
    var city: String = ""

    /**资源类型[TYPE_PIC],[TYPE_VIDEO]*/
    var accid: String? = ""
    var avatar: String = ""//用户头像
    var can_chat: Int = 0//用户聊天是否已经解锁，0未 1已解锁
    var unlock_profile: Int = 0//用户信息是否已经解锁，0未 1已解锁
    fun graduateStr() = resourceProvider.getGraduateStatusStr(graduate.toIntOrNull())

    fun getPickTimesStr() = "保留${pick_times}次"

    fun isShowLock() = unlock_profile == 0

    ///展示的照片
    fun showPic() = getRealList().firstOrNull()?.realUrl()
    fun showSlimPic() = getRealList().firstOrNull()?.realUrl()?.qiniuSlim()
    val isUnlockProfile get() = unlock_profile == 1
    fun unlockProfile() {
        unlock_profile = 1
    }
}